Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dev): Upgrade kafka and zookeeper to support Apple M1 #28574

Merged
merged 6 commits into from
Sep 15, 2021

Conversation

armenzg
Copy link
Member

@armenzg armenzg commented Sep 14, 2021

This version of zookeper does not throw qemu panics on Apple's M1.

See issue: confluentinc/kafka-images#80 (comment)

@armenzg armenzg added the Component: Developer Environment This covers issues related to setting up a developer's environment label Sep 14, 2021
@armenzg armenzg added this to the Apple M1 devservices support milestone Sep 14, 2021
@armenzg armenzg self-assigned this Sep 14, 2021
@@ -162,7 +162,7 @@ runs:
--name sentry_zookeeper \
-d --network host \
-e ZOOKEEPER_CLIENT_PORT=2181 \
confluentinc/cp-zookeeper:4.1.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the CI was running an older version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version do we run in production?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we run 4.1.2-3 and version 3.4.11 for zookeeper.

Should I make the CI test against those versions?

As curiosity, we run a range of versions across the org: https://github.com/search?q=org%3Agetsentry+cp-kafka&type=code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we should have CI match production, let's leave comments here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@billyvg I've discovered that version of zookeeper we use in production is no longer available on Docker hub, thus, we cannot match the versions between CI and production.

FYI, this part of the PR is completely unnecessary to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked about the versions picked in #20543 (review)

@armenzg armenzg marked this pull request as ready for review September 14, 2021 18:53
@armenzg armenzg requested a review from a team as a code owner September 14, 2021 18:53
@armenzg
Copy link
Member Author

armenzg commented Sep 14, 2021

I tried getting rid of zookeeper but it got complicated.

Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also change these in getsentry

@@ -162,7 +162,7 @@ runs:
--name sentry_zookeeper \
-d --network host \
-e ZOOKEEPER_CLIENT_PORT=2181 \
confluentinc/cp-zookeeper:4.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we should have CI match production, let's leave comments here

@@ -1724,15 +1724,15 @@ def build_cdc_postgres_init_db_volume(settings):
),
"zookeeper": lambda settings, options: (
{
"image": "confluentinc/cp-zookeeper:5.1.2",
"image": "confluentinc/cp-zookeeper:6.2.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave comments here about the versions and why it differs from CI/prod

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@armenzg
Copy link
Member Author

armenzg commented Sep 15, 2021

We should also change these in getsentry

There's no changes required on getsentry as far as I know.

@armenzg armenzg changed the title feat(ci): Upgrade kafka and zookeeper feat(dev): Upgrade kafka and zookeeper to support Apple M1 Sep 15, 2021
@armenzg armenzg merged commit b4bfb00 into master Sep 15, 2021
@armenzg armenzg deleted the armenzg/dev/upgrade-kafka-zookeeper branch September 15, 2021 13:57
@avgupta456
Copy link

When developing locally with Docker today, I ran into a new issue of sentry_kafka and sentry_zookeeper docker containers continually crashing and restarting. The error logs match confluentinc/cp-docker-images#883. I believe this is due to updating to 6.2.0 from 5.1.2 in conf/server.py. Reverting these two lines solves the issue locally.

@armenzg
Copy link
Member Author

armenzg commented Sep 20, 2021

If this doesn't get reverted today, I will look into fixing it tomorrow.

Are there any tests that should have caught this? What tests could catch such a regression?

armenzg added a commit that referenced this pull request Sep 20, 2021
…28574)"

This reverts commit b4bfb00.

It seems to cause the images to restart (see [comment](#28574 (comment))).
@armenzg
Copy link
Member Author

armenzg commented Sep 20, 2021

I created #28672 in case someone wants to revert this change while I'm off today.

armenzg added a commit that referenced this pull request Sep 21, 2021
When we [upgraded the kafka and zookeeper images we use][1], we did not update the volume to
use the full path (as the [instructions indicate][2]), thus, started to see this error:

>  Command [/usr/local/bin/dub path /var/lib/kafka/data writable] FAILED !

This change adds the full path.

[1]: #28574
[2]: https://docs.confluent.io/platform/current/installation/docker/operations/external-volumes.html#data-volumes-for-kafka-and-zk
@armenzg armenzg linked an issue Sep 21, 2021 that may be closed by this pull request
@armenzg
Copy link
Member Author

armenzg commented Sep 21, 2021

There's a fix in #28724

armenzg added a commit that referenced this pull request Sep 21, 2021
When we [upgraded the kafka and zookeeper images we use][1], we did not update the volume to
use the full path (as the [instructions indicate][2]), thus, started to see this error:

>  Command [/usr/local/bin/dub path /var/lib/kafka/data writable] FAILED !

This change adds the full path.

[1]: #28574
[2]: https://docs.confluent.io/platform/current/installation/docker/operations/external-volumes.html#data-volumes-for-kafka-and-zk
armenzg added a commit that referenced this pull request Oct 4, 2021
…28574)" (#28672)

This reverts commit b4bfb00.

Originally (see [originally reported issue](#28574 (comment))), instead of reverting my change, I landed a fix that only seems to work on Apple M1 (see fix #28724). Nevertheless, It seems that the *Intel* images would still fail with the same error (see issue #29022) with:
> Command [/usr/local/bin/dub path /var/lib/kafka/data writable] FAILED !

Let's revert it and I will try again later.

Fixes #29022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: Developer Environment This covers issues related to setting up a developer's environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zookeper Docker image not working on Apple's arm64
3 participants